// 只有 user 的接口单独抽离出来
import { axios, PathBuilder, handleStatus } from "./index";

const builder = new PathBuilder("login");

// 登录接口
export async function postLogin(data) {
  return axios.post(builder.build("login"), data).then(handleStatus);
}

// 获取用户信息
export function getUserInfo() {
  return axios.get(builder.build("get_login_user")).then(handleStatus);
}

// 退出登录
export function signOut() {
  console.log("sign out have not implement yet");
  return;
}
